package yagwl.client.view.demo;

import java.util.ArrayList;
import java.util.List;

import yagwl.client.model.MenuNodeDTO;
import yagwl.client.view.fnd.FlexEntityView;
import yagwl.client.widget.SideSection;
import yagwl.client.widget.VerticalMenu;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Hyperlink;

public class SideMenu extends Composite {
  private SideSection rootSP = new SideSection("Composite Widgets Demo");

  public SideMenu() {
    List<MenuNodeDTO> menus = new ArrayList<MenuNodeDTO>();
    menus.add(new MenuNodeDTO(new Hyperlink("PagedCellTable",
        LaureateListView2.HistoryToken)));
    menus.add(new MenuNodeDTO(new Hyperlink("FilteredTable",
        FilteredLaureateView.HistoryToken)));
    menus.add(new MenuNodeDTO(new Hyperlink("PagedFlexTable",
        LaureateListView.HistoryToken)));
    menus.add(new MenuNodeDTO(new Hyperlink("ManagedTree",
        ProductHierarchy.HistoryToken)));
    menus.add(new MenuNodeDTO(new Hyperlink("FormPanel, Input Widgets",
        ContactCreateForm.HistoryToken)));
    menus.add(new MenuNodeDTO(new Hyperlink("ScrollingSplitPanel",
        FlexEntityView.HistoryToken)));
    VerticalMenu rootVM = new VerticalMenu();
    rootVM.setMenuNodes(menus);
    rootSP.setContent(rootVM);
    initWidget(rootSP);
  }
}
